<?php



namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * @OA\Schema(
 *     schema="Comment",
 *     type="object",
 *     @OA\Property(property="id", type="integer", example=1),
 *     @OA\Property(property="content", type="string", example="This is a comment"),
 *     @OA\Property(property="issue_id", type="integer", example=1),
 *     @OA\Property(property="user_id", type="integer", example=7),
 *     @OA\Property(property="created_at", type="string", format="date-time", example="2025-03-08T10:48:37.000000Z"),
 *     @OA\Property(property="updated_at", type="string", format="date-time", example="2025-03-08T10:48:37.000000Z"),
 * )
 */
class Comment extends Model
{
    protected $fillable = ['issue_id', 'content', 'user_id'];

    public function user()
    {
        return $this->belongsTo(User::class);
    }

    public function issue()
    {
        return $this->belongsTo(Issue::class);
    }
}
